import axios from 'axios';

axios.defaults.baseURL = 'http://dev.nc.com/api/';
// axios.defaults.baseURL = 'http://localhost:8081/';
axios.defaults.timeout = '3000';
axios.defaults.headers.common.Authorization = 'Bearer pwBK8R4TzvZVwZqnPadBT77tDi0n3koLn9nO6FaEuSREY6txQM7tD35hZliZ';
// axios.defaults.headers = 'Bearer pwBK8R4TzvZVwZqnPadBT77tDi0n3koLn9nO6FaEuSREY6txQM7tD35hZliZ';
// 添加请求拦截器
axios.interceptors.request.use(
  // config => config,
  config => config,
  (error) => {
    Promise.reject(error);
  },
);
// 添加响应拦截器
axios.interceptors.response.use(response => response.data, error => Promise.reject(error.response));

export default axios;
